package com.todod.model;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * <p>
 * 
 * </p>
 *
 * @author jpf
 * @since 2020-12-14
 */
@TableName("LTCLOUD_ZSGL_DB_DEV.sys_department")
public class Department implements Serializable {

	private static final long serialVersionUID = 1L;

	@TableId("sd_id")
	private Long id;

	/**
	 * 名称
	 */
	@TableField("sd_name")
	private String name;

	/**
	 * 父节点ID
	 */
	@TableField("sd_parent_id")
	private Long parentId;

	/**
	 * 排序号
	 */
	@TableField("sd_sort_num")
	private Integer sortNum;

	/**
	 * 备注
	 */
	@TableField("sd_remark")
	private String remark;

	/**
	 * 是否启用 1:启用 2:未启用
	 */
	@TableField("sd_state")
	private String state;

	/**
	 * 创建用户id
	 */
	@TableField("sd_create_user_id")
	private Long createUserId;

	/**
	 * 创建时间
	 */
	@TableField("sd_create_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime createTime;

	/**
	 * 修改用户名id
	 */
	@TableField("sd_modify_user_id")
	private Long modifyUserId;

	/**
	 * 修改时间
	 */
	@TableField("sd_modify_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime modifyTime;

	/**
	 * 抽取标志位
	 */
	@TableField("sd_get_flag")
	private String getFlag;

	/**
	 * 抽取批次号
	 */
	@TableField("sd_get_batch")
	private String getBatch;

	@JsonInclude(JsonInclude.Include.NON_EMPTY) // 表示不为空的时候才返回数据
	@TableField(exist = false) // 表示该属性在数据表里不存在
	private List<Department> children;

	public List<Department> getChildren() {
		return children;
	}

	public void setChildren(List<Department> children) {
		this.children = children;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public Integer getSortNum() {
		return sortNum;
	}

	public void setSortNum(Integer sortNum) {
		this.sortNum = sortNum;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Long getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(Long createUserId) {
		this.createUserId = createUserId;
	}

	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}

	public Long getModifyUserId() {
		return modifyUserId;
	}

	public void setModifyUserId(Long modifyUserId) {
		this.modifyUserId = modifyUserId;
	}

	public LocalDateTime getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(LocalDateTime modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getGetFlag() {
		return getFlag;
	}

	public void setGetFlag(String getFlag) {
		this.getFlag = getFlag;
	}

	public String getGetBatch() {
		return getBatch;
	}

	public void setGetBatch(String getBatch) {
		this.getBatch = getBatch;
	}

	@Override
	public String toString() {
		return "Department{" + "id=" + id + ", name=" + name + ", parentId=" + parentId + ", sortNum=" + sortNum
				+ ", remark=" + remark + ", state=" + state + ", createUserId=" + createUserId + ", createTime="
				+ createTime + ", modifyUserId=" + modifyUserId + ", modifyTime=" + modifyTime + ", getFlag=" + getFlag
				+ ", getBatch=" + getBatch + "}";
	}
}
